﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleAppTest
{
    class Program
    {
        static void Main(string[] args)
        {
            ServiceReference.FractionArihmeticServiceClient client = new ServiceReference.FractionArihmeticServiceClient();
            


            ServiceReference.Fraction fra1 = new ServiceReference.Fraction();
            Console.WriteLine("Input Fraction 1");
            Console.Write("Numerator: ");
            fra1.Numerator = Convert.ToInt16(Console.ReadLine());
            Console.Write("Denominator: ");
            fra1.Denominator = Convert.ToInt16(Console.ReadLine());

            ServiceReference.Fraction fra2 = new ServiceReference.Fraction();
            Console.WriteLine("\nInput Fraction 2");
            Console.Write("Numerator: ");
            fra2.Numerator = Convert.ToInt16(Console.ReadLine());
            Console.Write("Denominator: ");
            fra2.Denominator = Convert.ToInt16(Console.ReadLine());

            Console.WriteLine("------------------------------------");
            ServiceReference.Fraction result = new ServiceReference.Fraction();
            result = client.Add(fra1, fra2);
            Console.WriteLine("Result Add: " + result.Numerator + "/" + result.Denominator);
            result = client.Subtract(fra1, fra2);
            Console.WriteLine("Result Subtract: " + result.Numerator + "/" + result.Denominator);
            result = client.Multiply(fra1, fra2);
            Console.WriteLine("Result Multiply: " + result.Numerator + "/" + result.Denominator);
            result = client.Division(fra1, fra2);
            Console.WriteLine("Result Division: " + result.Numerator + "/" + result.Denominator);




            Console.Write("\nPress any key.....");
            Console.ReadLine();

        }
    }
}
